﻿using System;

class ReversedDigits
{
    //Exercase 7.
    //Write a method that reverses the digits of given decimal number. Example: 256 -> 652

    static void Main()
    {
        Console.Write("Type a decimal number: ");
        string number = Console.ReadLine();
        int numberInt = int.Parse(number);

        ReverseDigits(number, numberInt);
    }

    private static void ReverseDigits(string number, int numberInt)
    {
        while (numberInt > 0)
        {
            for (int i = number.Length - 1; i >= 0; i--)
            {
                Console.Write(number[i]);
            }
            Console.WriteLine();
            return;            
        }
        
    }
}

